<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Nav extends Model
{
    //
    protected $table = 'nav';
    public static function getMenu($name){
        $group_id = NavGroup::where('name',$name)->first();
        $list = self::where('group_id',$group_id->id)->get();
        if($list){
            return $list->toArray();
        }
    }
}
